package com.jk.interfaces;

import com.jk.dto.TbStudent;
import com.jk.pojo.PagedResponse;
import com.jk.pojo.ResponseResult;
import org.apache.ibatis.annotations.Delete;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author yzf
 * @version 1.0
 * @description: TODO
 * @date 2024/12/9 19:22
 */
public interface TbStudentServiceApi {

    //查询
    @PostMapping(value = "/student/findTbStudentList")
    public PagedResponse<TbStudent> findTbStudentList(@RequestBody TbStudent tbStudent, @RequestParam(value = "pageNum") Integer pageNum, @RequestParam(value = "pageSize") Integer pageSize);
    //新增
    @PostMapping(value = "/student/addStudent")
    public void addStudent(@RequestBody TbStudent tbStudent);

    //删除
    @DeleteMapping(value = "/student/deleteStudentById")
    public void deleteStudentById(@RequestParam("id") Integer id);

    //回显
    @DeleteMapping(value = "/student/getStudentById")
    public TbStudent getStudentById(@RequestParam("id") Integer id);
    //修改
    @PostMapping(value = "/student/upStudent")
    public void upStudent(@RequestBody TbStudent tbStudent);

    //修改
    @PostMapping(value = "/student/upstatus")
    public void upstatus(@RequestBody TbStudent tbStudent);
    //修改
    @PostMapping(value = "/student/updatestatus")
    public void updatestatus(@RequestBody TbStudent tbStudent);

    @GetMapping(value = "/student/findTbStudent")
    public List<TbStudent> findTbStudent();

    @PostMapping(value = "/student/findStudentByUserName")
    public TbStudent findStudentByUserName(@RequestParam(value = "username") String username);


}
